package demo.practice.leetcode;


import lombok.extern.slf4j.Slf4j;

@Slf4j
public class BaseKnowledge {


    public static void main(String[] args) {
        int a[]={1,2,3};
        int b[]=a;
        a[0]=5;

        /*System.out.println(a);
        System.out.println(b);
        System.out.println(b[0]);*/

        BaseKnowledge baseKnowledge = new BaseKnowledge();
        baseKnowledge.test();
        baseKnowledge.test2();

    }

    int c[]={1,2,3};
    public void test(){
        log.info("test:: 引用型");
        int d[] =c;
        d[0]=50;
        System.out.println(c[0]);

    }


    public void test2(){
        log.info("test2::i++");
        int i=0;
        System.out.println(i++);
        System.out.println(i);
    }


    public void test3(){
        log.info("test2::++i");
        int i=0;
        System.out.println(++i);
        System.out.println(i);
    }
}
